Integrand size = 40, antiderivative size = 96 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {(A-B) c \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3050, 2817, 2816, 2746, 31} \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {c (A-B) \cos (e+f x) \log (\sin (e+f x)+1)}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a \sin (e+f x)+a}} \]
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 2817
Rule 3050
Rubi steps \begin{align*} \text {integral}& = \frac {B \int \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)} \, dx}{a}-(-A+B) \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx \\ & = -\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {(a (-A+B) c \cos (e+f x)) \int \frac {\cos (e+f x)}{a+a \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = -\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}-\frac {((-A+B) c \cos (e+f x)) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \\ & = \frac {(A-B) c \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}-\frac {B \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}} \\ \end{align*}
Result contains complex when optimal does not.
Time = 2.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.24 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left ((A-B) \left (-i f x+2 \log \left (i+e^{i (e+f x)}\right )\right )+B \sin (e+f x)\right ) \sqrt {c-c \sin (e+f x)}}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a (1+\sin (e+f x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(305\) vs. \(2(88)=176\).
Time = 3.39 (sec) , antiderivative size = 306, normalized size of antiderivative = 3.19
method | result | size |
parts | \(-\frac {A \left (2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}\, \left (\cos \left (f x +e \right )+\sin \left (f x +e \right )+1\right )}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}+\frac {B \left (2 \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right ) \sin \left (f x +e \right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \cos \left (f x +e \right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )+\cos ^{2}\left (f x +e \right )-\cos \left (f x +e \right ) \sin \left (f x +e \right )+2 \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-\ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-\sin \left (f x +e \right )-1\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}\) | \(306\) |
default | \(\frac {\left (A \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \sin \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+A \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \cos \left (f x +e \right ) \sin \left (f x +e \right )-B \sin \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \sin \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+B \left (\cos ^{2}\left (f x +e \right )\right )-B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \cos \left (f x +e \right ) \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )+A \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-2 A \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \sin \left (f x +e \right )-B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )+2 B \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )+1\right )-B \right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}{f \left (-\cos \left (f x +e \right )+\sin \left (f x +e \right )-1\right ) \sqrt {a \left (1+\sin \left (f x +e \right )\right )}}\) | \(347\) |
[In]
[Out]
\[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int { \frac {{\left (B \sin \left (f x + e\right ) + A\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{\sqrt {a \sin \left (f x + e\right ) + a}} \,d x } \]
[In]
[Out]
\[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \]
[In]
[Out]
none
Time = 0.36 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.83 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {B {\left (\frac {2 \, \sqrt {c} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{\sqrt {a}} - \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {a}} - \frac {2 \, \sqrt {a} \sqrt {c} \sin \left (f x + e\right )}{{\left (a + \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - A {\left (\frac {2 \, \sqrt {c} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{\sqrt {a}} - \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {a}}\right )}}{f} \]
[In]
[Out]
none
Time = 0.38 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.49 \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\frac {\sqrt {2} {\left (\frac {2 \, \sqrt {2} B \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} {\left (A \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - B \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \log \left (-4 \, \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 4\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )} \sqrt {c}}{2 \, f} \]
[In]
[Out]
Timed out. \[ \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx=\int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,\sqrt {c-c\,\sin \left (e+f\,x\right )}}{\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \]
[In]
[Out]